#ifndef WCR_H_
#define WCR_H_

#include "recbase.h"
#include "rectype.h"
#include "stdffield.h"
#include <string>

namespace opsrc {
    namespace stdf {

        class Wcr : public opsrc::stdf::RecBase
        {
        public:            
            Wcr(stdf_rec stdfrec,  int reclen, std::ios::pos_type fileRecFirstBytePosition, int orderindex, endian e, char* buf);
            virtual ~Wcr();

            const StdfField<float> getWaferSize() const;
            void setWaferSize(StdfField<float> wfrsiz);

            const StdfField<float> getDieHeight() const;
            void setDieHeight(StdfField<float> dieht);

            const StdfField<float> getDieWidth() const;
            void setDieWidth(StdfField<float> diewid);

            const StdfField<int> getWaferUnit() const;
            void setWaferUnit(StdfField<int> wfrunit);

            const StdfField<string> getWaferFlat() const;
            void setWaferFlat(StdfField<string> wfrflat);

            const StdfField<int> getCenterX() const;
            void setCenterX(StdfField<int> centerx);

            const StdfField<int> getCenterY() const;
            void setCenterY(StdfField<int> centery);

            const StdfField<string> getPositionX() const;
            void setPositionX(StdfField<string> posx);

            const StdfField<string> getPositionY() const;
            void setPositionY(StdfField<string> posy);

            void readFields(char *buf);

        protected:
            Wcr();

        private:
            StdfField<float> wfr_siz;
            StdfField<float> die_ht;
            StdfField<float> die_wid;
            StdfField<int> wfr_unit;
            StdfField<string> wfr_flat;
            StdfField<int> center_x;
            StdfField<int> center_y;
            StdfField<string> pos_x;
            StdfField<string> pos_y;
            endian en;
            bool decodeFields;
            /*
WAFR_SIZ R*4 Diameter of wafer in WF_UNITS 0
DIE_HT R*4 Height of die in WF_UNITS 0
DIE_WID R*4 Width of die in WF_UNITS 0
WF_UNITS U*1 Units for wafer and die dimensions 0
WF_FLAT C*1 Orientation of wafer flat space
CENTER_X I*2 X coordinate of center die on wafer -32768
CENTER_Y I*2 Y coordinate of center die on wafer -32768
POS_X C*1 Positive X direction of wafer space
POS_Y C*1 Positive Y direction of wafer space
*/			
        };

    }	// namespace stdf
}		// namespace opsrc

#endif /*WCR_H_*/
